#ifndef SERVER_H
#define SERVER_H
#include <my_header.h>

extern char global_ip[20];
extern char global_port[10];
extern char global_thread_num[10];
extern char global_mysql_user[20];
extern char global_mysql_pass[20];
extern char time_out_num[10];
extern int global_log_fd;
extern int global_sig_fd[2];

typedef struct user_s{
    int cli_fd;
    int location_index;
    struct user_s *Next;
}user_t;

typedef struct{
    user_t *front;
    user_t *rear;
    int size;
}task_queue_t;

typedef struct{
    int thread_num;
    pthread_t *tid_arr;
    pthread_mutex_t mutex;
    pthread_cond_t cond;
    task_queue_t task_queue;
}thread_pool_t;

typedef struct{
    int ser_fd;
    int sig_fd;
    MYSQL *mysql;
    int ep_fd;
    thread_pool_t thread_pool;
    user_t *time_out_arr;
}net_disk_t;

typedef struct{
    int command;
    int size;
    char file_path_arr[10][1024];
}command_t;

#include "login_register.h"
#include "server_sql_func.h"
#endif





























